{include file="../application/admin/view/admin/header.html" /}
		<div class="nav_z clearfix">
			<div id="box" class="nav_nav">
				<ul>
			       <li class="kebi trr tdd"><a href="{:url('admin/Index/index')}">教师工作量</a></li>
			       <li class="tdd"><a href="{:url('admin/Admin/index')}">领导统计表</a></li>
			    </ul>
				<ul class="gdd">
					<li class="rdd edd"><span class="glyphicon glyphicon-home"></span>首页</li>
					<li class="edd ti"><a href="{:url('admin/Admin/index')}"><span class="glyphicon glyphicon-list-alt"></span>学期管理</a></li>
					<li class="edd ti"><a href="{:url('admin/Admin/banji')}"><span class="glyphicon glyphicon-list-alt"></span>班级管理</a></li>
					<li class="edd ti"><a href="{:url('admin/Admin/kecheng')}"><span class="glyphicon glyphicon-list-alt"></span>课程管理</a></li>
					<li class="edd ti"><a href="{:url('admin/Admin/yohu')}"><span class="glyphicon glyphicon-list-alt"></span>用户管理</a></li>
					<li id="wei" class="xuanz edd ti toji"><a id="add" href="#"><span class="glyphicon glyphicon-list-alt"></span>教师统计表</a></li>
					<li class="jiao" style="display: block;">
                        <ul>
					       <li><a href="{:url('admin/Admin/winning')}">获奖统计</a></li>
					       <li><a href="{:url('admin/Admin/training')}">实训统计</a></li>
					       <li><a href="{:url('admin/Admin/sk')}">授课统计</a></li>
					       <li class="xuanz"><a id="add" href="{:url('admin/Admin/research')}">科研项目统计</a></li>
					       <li><a href="{:url('admin/Admin/paper')}">论文发表统计</a></li>
					       <li><a href="{:url('admin/Admin/train')}">培训(出差)统计</a></li>
					    </ul>
					</li>
					<li class="edd ti"><a href="{:url('admin/Admin/toji')}"><span class="glyphicon glyphicon-list-alt"></span>总体统计表</a></li>
				</ul>
			</div>
		</div>
		<!-- 领导表格 -->
		<div class="nav_z_cont">
			<!-- 教师统计表 -->
			<div id="list3" class="yi" style="height: 600px;">
			    <!-- 科研项目统计表 -->
				<div class="yl">
					<form action="{:url('admin/Admin/r_search')}" class="xzxueqi">
							<select name="term_id">
							    {volist name="tList" id="t"}
									<option value="{$t['id']}">{$t['term']}</option>
								{/volist}
								<option selected>选择学期</option>
							</select>
							<div class="fu_h">
								<input type="text" name="search" class="btn" placeholder="请输入搜索内容">
								<button type="submit" class="btn"><span class="glyphicon glyphicon-search"></span></button>
						    </div>
						</form>
						<table>
							<tr class="tr1">
								<td colspan="4" style="text-align: left;">科研项目统计表</td>
								<td colspan="4" style="text-align: right;">
								</td>
							</tr>
							<tr>
								<td>教师</td>
								<td>学期</td>
								<td>项目名称</td>
								<td>立项时间</td>
								<td>结题时间</td>
								<td>级别</td>
								<td>状态</td>
								<td>操作</td>
							</tr>
							{volist name="researchList" id="vo" empty="$empty"}
							<tr>
								<td>{$vo['username']}</td>
								<td>{$vo['term']}</td>
								<td>{$vo['entry_name']}</td>
								<td>{$vo['project_time']}</td>
								<td>{$vo['closing_time']}</td>
								<td>{$vo['level']}</td>
								{if $vo['state']==1}
									<td class="zhuangt">未审核</td>
									<td class="caoz">
										<button type="button" class="btn tijiao bianj" onclick="r_view({$vo['id']})">查看</button>
										<button type="button" class="btn bianji" onclick='if(confirm("确定通过？")){window.location="{:url('admin/Admin/r_tg',['id'=> $vo['id']])}"}'>通过</button>
										<button type="button" class="btn shanchu mdd" onclick='if(confirm("确定不通过？")){window.location="{:url('admin/Admin/r_btg',['id'=> $vo['id']])}"}'>不通过</button>
									</td>
								{elseif $vo['state']==2 /}
									<td class="yish">已审核</td>
									<td class="caoz">
										<button type="button" class="btn tijiao bianj" onclick="r_view({$vo['id']})">查看</button>
										<button type="button" class="btn bianji" disabled="disabled">通过</button>
										<button type="button" class="btn shanchu mdd" disabled="disabled">不通过</button>
									</td>
								{/if}
							</tr>
						{/volist}
						</table>
						<div class="page">
							{$page}
						</div>
				</div>
			</div>
		</div>
		<!-- 查看窗口 -->
		<div class="bjbox">
		　	<span class="closeBtn glyphicon glyphicon-remove" title="关闭"></span>
			<h2><span class="glyphicon glyphicon-tag"></span>获奖统计</h2>
			<div id="tr2">

				<ul class="ul1">
					<li>教师:</li>
					<li>学期:</li>
					<li>项目名称:</li>
					<li>立项时间:</li>
					<li>结题时间:</li>
					<li>级别:</li>
					<li>状态:</li>
					<li>创建时间:</li>
				</ul>

				<ul class="ul2">
					<li id="username"></li>
					<li id="term"></li>
					<li id="entry_name"></li>
					<li id="project_time"></li>
					<li id="closing_time"></li>
					<li id="level"></li>
					<li id="state"></li>
					<li id="create_time"></li>
				</ul>

			</div>
		</div>
		
	</div>
</body>
<script>
//科研数据传到查看框
	function r_view(id){
		var url = "{:url('admin/Admin/r_view')}";
		$.get(url,{id:id},
			function(data){
				$('#term').html(data.term);
				$('#username').html(data.username);
				$('#entry_name').html(data.entry_name);
				$('#project_time').html(data.project_time);
				$('#closing_time').html(data.closing_time);
				$('#level').html(data.level);
				if(data.state==1){
					$('#state').html("未审核");
				}else{
					$('#state').html("已审核");
				}
				function timestampToTime(timestamp) {
			        var date = new Date(timestamp * 1000);//时间戳为10位需*1000，时间戳为13位的话不需乘1000
			        var Y = date.getFullYear() + '年';
			        var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '月';
			        var D = date.getDate() + '日';
			        return Y+M+D;
			    }
			    var t=timestampToTime(data.create_time);
				$('#create_time').html(t);
			}
		);
	}
</script>
</html>